Script: --on windowEvent wdID,wdName,objNo,objName,objValue¬¬Global titleList, selectedTitleNum, gWindowPositions¬global gIssuesListWindowID, gShowOnlyMyTitles, gMyTitleList, gCurrentPaneList¬¬---------------------¬-- This is window #25¬---------------------¬¬if objValue="Open" then ¬ -- Restore old window position¬ set cursor to watch¬ put OldWindowPosition(25) into windowRect¬ if windowRect = empty then centerWindow wdName¬ else set the rect of window id wdid to windowRect¬ ¬ -- Go to titles background, if necessary.¬ if the short name of this background <> "Title" then¬ lock screen¬ go cd 1 of bg "Title"¬ end if¬ -- Close any open issues windows¬ if gIssuesListWindowID is a number then¬ if there is a window id gIssuesListWindowID and gIssuesListWindowID <> wdID then¬ wsSend gIssuesListWindowID,0,"Close"¬ put empty into gIssuesListWindowID¬ end if¬ end if¬ ¬ -- Figure out which selection to start with¬ wsSet wdID,"11","Hilite",gShowOnlyMyTitles¬ wsSet wdID,"10","Hilite", not (gShowOnlyMyTitles)¬ ¬ put line selectedTitleNum of titleList into theTitle¬ put Capitalize(char 1 of (line selectedTitleNum of titleList)) into firstChar¬ ¬ if firstChar >= "A" and firstChar <= "Z" then put CharToNum(firstChar) - 63 into alphaSelectPos¬ else put 1 into alphaSelectPos¬ set alphaStrip_Selection of window id wdID to (alphaSelectPos & ",1")¬ ¬ if gShowOnlyMyTitles = true then¬ SetNewList gMyTitleList, alphaSelectPos, wdID, false¬ put find(gCurrentPaneList, theTitle, "Line", "Exact") into foundPos¬ if foundPos < 1 and the number of lines of gCurrentPaneList > 0 then put 1 into foundPos¬ set the properties of window id wdID to "Comictitles_Selection:" & (foundPos) & return & "Modify…_Disabled:" & (theTitle = empty) & return & "Remove_Disabled:" & (theTitle = empty) & return ¬ else¬ SetNewList TitleList, alphaSelectPos, wdID, false¬ set the properties of window id wdID to "Comictitles_Selection:" & (selectedTitleNum - (xlistStartPos of window id wdID) + 1) & return & "Modify…_Disabled:" & (theTitle = empty) & return & "Remove_Disabled:" & (theTitle = empty) & return ¬ end if¬ ¬ set typedTitle_text of window id wdID to comicTitles_SelectionText of window id wdID¬ set typedTitle_Selection of window id wdID to "0,200"¬ ¬ if there is a menuItem "Close" of menu "File" then¬ enable menuItem "Close" of menu "File"¬ end if¬ ¬else if objValue="Close" then ¬ -- save the window position¬ put "25" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 25 of gWindowPositions¬ if there is a menuItem "Close" of menu "File" then¬ disable menuItem "Close" of menu "File"¬ end if¬ ¬else if objValue="Suspend" then ¬ put frontWindow() into theFrontID¬ if wsGet(theFrontID,"0","HasCloseBox") <> "true" then¬ if there is a menuItem "Close" of menu "File" then¬ disable menuItem "Close" of menu "File"¬ end if¬ end if¬ ¬else if objValue="Resume" then ¬ if the short name of this background <> "Title" then ¬ lock screen¬ go cd 1 of bg "Title"¬ end if¬ if there is a menuItem "Close" of menu "File" then¬ enable menuItem "Close" of menu "File"¬ end if¬end if¬¬--end windowEvent
ItemType: PUSH
Rect: 265,273,347,293
AutoSize: FALSE
Name: Modify…
DefaultItem: TRUE
Balloon: Click here to modify the title you’ve selected above.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬Global selectedTitle, titleList¬Global selectedTitleNum ¬¬set cursor to watch¬¬put comicTitles_SelectionText of window id wdID into listOfTitles¬put the number of lines of listOfTitles into numTitles¬¬repeat with x = 1 to numTitles¬ put line x of listOfTitles into selectedTitle¬ put find(titleList,selectedTitle,"Line","Exact") into whereFound¬ if whereFound > 0 then¬ put whereFound into selectedTitleNum¬ -- put (ComicTitles_Selection of window "Titles") + ((xListStartPos of window id wdID) - 1) into SelectedTitleNum¬ -- put line selectedTitleNum of titleList into selectedTitle¬ send ModifyATitle to cd btn "ModifyATitle" of cd 3¬ end if¬end repeat¬-- put (ComicTitles_Selection of window "Titles") + ((xListStartPos of window "Titles") - 1) into SelectedTitleNum¬--end mouseUp¬¬¬¬
ItemType: PUSH
Rect: 10,273,100,293
AutoSize: FALSE
Name: Remove
Balloon: Click here (or type Command-N) to add a new title to the ComicBase.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬Global selectedTitle, titleList, selectedTitleNum¬¬set cursor to watch¬¬if the short name of this background <> "Title" then¬ lock screen¬ go cd 1 of bg "Title"¬end if¬¬put line 1 of comicTitles_SelectionText of window id wdID into selectedTitle¬put find(titleList,selectedTitle,"Line","Exact") into whereFound¬if whereFound > 0 then¬ put whereFound into selectedTitleNum¬ send doDeleteTitle to cd 2¬end if¬--end mouseUp
ItemType: LIST
Rect: 9,48,360,245
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
GrowItem: TRUE
Name: ComicTitles
Logic: Single
DoubleClickItem: 1
Text:
Balloon: This is a list of all comics in the ComicBase. Click on a title (or type the first few letters of its name) to select it.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global gShowOnlyMyTitles¬¬put comicTitles_selection of window id wdID into theSelection¬put ((comicTitles_TextOfSelection of window id WdID) = empty) into modifyDisabled¬put (xlistStartPos of window id wdID) + theSelection - 1 into indexPos¬¬set the properties of window id wdID to "TypedTitle_Text:" & objValue & return & "typedTitle_Selection:0,200" & return & "Modify…_Disabled:" & modifyDisabled & return & "Remove_Disabled:" & modifyDisabled & return & "NextIssue_Text:" & line indexPos of gLastIssueList & return & "NextCost_Text:" & line indexPos of gLastIssueCoverPriceList & return & "NextPrice_Text:" & line indexPos of gLastIssueCoverPriceList & return¬--end mouseUp
ItemType: PUSH
Rect: 161,272,251,292
AutoSize: FALSE
Name: New… N
Balloon: Click here (or type Command-N) to add a new title to the ComicBase.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬Global selectedTitle, selectedTitleNum¬Global theCreatedTitle, gNewName,gNewAbbreviation¬Global copyrightInfo, matureReaders, newPublisher, gDatesPublished¬¬if the short name of this background <> "Title" then¬ lock screen¬ go cd 1 of bg "Title"¬end if¬¬put empty into selectedTitle¬put empty into theCreatedTitle¬Get WindowScript("Comic Title","True", "True")¬if it <> empty then¬ if line 1 of it = "Save" then¬ set cursor to watch¬ lock screen¬ set lockmessages to true¬ put line 2 of it into gNewName¬ if oldName = empty then put gNewName into selectedTitle¬ put line 3 of it into newPublisher¬ if newPublisher = "Other…" then put line 4 of it into newPublisher¬ put line 5 of it into gNewAbbreviation¬ put line 6 of it into copyrightInfo¬ put line 7 of it into matureReaders¬ put line 8 of it into gDatesPublished¬ send SaveTitle to cd btn "SaveTitle" of cd 3¬ send openCard to this card -- To redraw screen & set color¬ end if¬end if¬¬--end mouseUp
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global selectedTitleNum, titleList¬global gShowOnlyMyTitles¬¬set cursor to watch¬¬put false into gShowOnlyMyTitles¬put line selectedTitleNum of titleList into theTitle¬put Capitalize(char 1 of (line selectedTitleNum of titleList)) into firstChar¬¬if firstChar >= "A" and firstChar <= "Z" then put CharToNum(firstChar) - 63 into alphaSelectPos¬else put 1 into alphaSelectPos¬set alphaStrip_Selection of window id wdID to (alphaSelectPos & ",1")¬¬SetNewList TitleList, alphaSelectPos, wdID, false¬set the properties of window id wdID to "Comictitles_Selection:" & (selectedTitleNum - (xlistStartPos of window id wdID) + 1) & return & "Modify…_Disabled:" & (theTitle = empty) & return & "Remove_Disabled:" & (theTitle = empty) & return¬¬set typedTitle_text of window id wdID to comicTitles_SelectionText of window id wdID¬set typedTitle_Selection of window id wdID to "0,200"¬¬--end mouseUp
ItemType: RAD
Rect: 130,9,224,22
TextFont: Geneva
TextSize: 10
WhiteColor: -8739,-8739,-8739
Name: Titles in Stock
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global selectedTitleNum, titleList, gMyTitleList, gCurrentPaneList¬global gShowOnlyMyTitles¬¬set cursor to watch¬put true into gShowOnlyMyTitles¬¬send UpdateMyTitlesList to cd 2¬¬put line selectedTitleNum of titleList into theTitle¬put Capitalize(char 1 of theTitle) into firstChar¬¬if firstChar >= "A" and firstChar <= "Z" then put CharToNum(firstChar) - 63 into alphaSelectPos¬else put 1 into alphaSelectPos¬set alphaStrip_Selection of window id wdID to (alphaSelectPos & ",1")¬¬SetNewList gMyTitleList, alphaSelectPos, wdID, false¬put find(gCurrentPaneList, theTitle, "Line", "Exact") into foundPos¬if foundPos < 1 and the number of lines of gCurrentPaneList > 0 then put 1 into foundPos¬set the properties of window id wdID to "Comictitles_Selection:" & (foundPos) & return & "Modify…_Disabled:" & (theTitle = empty) & return & "Remove_Disabled:" & (theTitle = empty) & return¬¬set typedTitle_text of window id wdID to comicTitles_SelectionText of window id wdID¬set typedTitle_Selection of window id wdID to "0,200"¬¬¬--end mouseUp